package cn.thoughtworks.school.usercenter.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;


@FeignClient(name = "${feign.programCenter.name}",
        url = "${feign.programCenter.url}")
@Service
public interface ProgramCenterFeign {


    @PostMapping("api/programs/{programId}/{type}/{userId}")
    ResponseEntity joinProgram(@PathVariable("programId") Long programId,
                                          @PathVariable("type") String type,
                                          @PathVariable("userId") Long userId,
                                          @RequestBody Map data);
}
